package pojo;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

@Entity
@Table(name="custo")
public class Customer {
	@Id
	private Integer id;
	@Column(name="cname",nullable=true,length=32,insertable=true,updatable=true,unique=false)
	private String cname;
//	@Transient
	private int age;
	@Column(columnDefinition="number(6,2)")
	private double sal;
	private Date birth;
	@Column(columnDefinition="char(1)")
	private boolean sex;
	
	public Customer() {
		// TODO Auto-generated constructor stub
	}
	
	public Customer(Integer id, String cname, int age, double sal, Date birth) {
		super();
		this.id = id;
		this.cname = cname;
		this.age = age;
		this.sal = sal;
		this.birth = birth;
	}
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getCname() {
		return cname;
	}
	public void setCname(String cname) {
		this.cname = cname;
	}
	public int getAge() {
		return age;
	}
	public void setAge(int age) {
		this.age = age;
	}
	
	public double getSal() {
		return sal;
	}
	public void setSal(double sal) {
		this.sal = sal;
	}
	public Date getBirth() {
		return birth;
	}
	public void setBirth(Date birth) {
		this.birth = birth;
	}

	public boolean isSex() {
		return sex;
	}

	public void setSex(boolean sex) {
		this.sex = sex;
	}

	@Override
	public String toString() {
		return "Customer [id=" + id + ", cname=" + cname + ", age=" + age
				+ ", sal=" + sal + ", birth=" + birth + ", sex=" + sex + "]";
	}
	
	
}
